Integrand size = 24, antiderivative size = 132 \[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^2} \, dx=\frac {(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(e f-d g) (f+g x)}-\frac {2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g (e f-d g)}-\frac {2 b^2 e n^2 \operatorname {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right )}{g (e f-d g)} \]
(e*x+d)*(a+b*ln(c*(e*x+d)^n))^2/(-d*g+e*f)/(g*x+f)-2*b*e*n*(a+b*ln(c*(e*x+ d)^n))*ln(e*(g*x+f)/(-d*g+e*f))/g/(-d*g+e*f)-2*b^2*e*n^2*polylog(2,-g*(e*x +d)/(-d*g+e*f))/g/(-d*g+e*f)
Time = 0.06 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.95 \[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^2} \, dx=\frac {-\left (\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (a g (d+e x)+b g (d+e x) \log \left (c (d+e x)^n\right )-2 b e n (f+g x) \log \left (\frac {e (f+g x)}{e f-d g}\right )\right )\right )+2 b^2 e n^2 (f+g x) \operatorname {PolyLog}\left (2,\frac {g (d+e x)}{-e f+d g}\right )}{g (-e f+d g) (f+g x)} \]
(-((a + b*Log[c*(d + e*x)^n])*(a*g*(d + e*x) + b*g*(d + e*x)*Log[c*(d + e* x)^n] - 2*b*e*n*(f + g*x)*Log[(e*(f + g*x))/(e*f - d*g)])) + 2*b^2*e*n^2*( f + g*x)*PolyLog[2, (g*(d + e*x))/(-(e*f) + d*g)])/(g*(-(e*f) + d*g)*(f + g*x))
Time = 0.39 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.89, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2844, 2841, 2840, 2838}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^2} \, dx\) |
\(\Big \downarrow \) 2844 |
\(\displaystyle \frac {(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x) (e f-d g)}-\frac {2 b e n \int \frac {a+b \log \left (c (d+e x)^n\right )}{f+g x}dx}{e f-d g}\) |
\(\Big \downarrow \) 2841 |
\(\displaystyle \frac {(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x) (e f-d g)}-\frac {2 b e n \left (\frac {\log \left (\frac {e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g}-\frac {b e n \int \frac {\log \left (\frac {e (f+g x)}{e f-d g}\right )}{d+e x}dx}{g}\right )}{e f-d g}\) |
\(\Big \downarrow \) 2840 |
\(\displaystyle \frac {(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x) (e f-d g)}-\frac {2 b e n \left (\frac {\log \left (\frac {e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g}-\frac {b n \int \frac {\log \left (\frac {g (d+e x)}{e f-d g}+1\right )}{d+e x}d(d+e x)}{g}\right )}{e f-d g}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle \frac {(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x) (e f-d g)}-\frac {2 b e n \left (\frac {\log \left (\frac {e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g}+\frac {b n \operatorname {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right )}{g}\right )}{e f-d g}\) |
((d + e*x)*(a + b*Log[c*(d + e*x)^n])^2)/((e*f - d*g)*(f + g*x)) - (2*b*e* n*(((a + b*Log[c*(d + e*x)^n])*Log[(e*(f + g*x))/(e*f - d*g)])/g + (b*n*Po lyLog[2, -((g*(d + e*x))/(e*f - d*g))])/g))/(e*f - d*g)
3.1.49.3.1 Defintions of rubi rules used
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 , (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_ Symbol] :> Simp[1/g Subst[Int[(a + b*Log[1 + c*e*(x/g)])/x, x], x, f + g* x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g + c *(e*f - d*g), 0]
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_ )), x_Symbol] :> Simp[Log[e*((f + g*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x )^n])/g), x] - Simp[b*e*(n/g) Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d + e*x ), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)/((f_.) + (g_. )*(x_))^2, x_Symbol] :> Simp[(d + e*x)*((a + b*Log[c*(d + e*x)^n])^p/((e*f - d*g)*(f + g*x))), x] - Simp[b*e*n*(p/(e*f - d*g)) Int[(a + b*Log[c*(d + e*x)^n])^(p - 1)/(f + g*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] & & NeQ[e*f - d*g, 0] && GtQ[p, 0]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.91 (sec) , antiderivative size = 537, normalized size of antiderivative = 4.07
method | result | size |
risch | \(-\frac {b^{2} \ln \left (\left (e x +d \right )^{n}\right )^{2}}{\left (g x +f \right ) g}-\frac {2 b^{2} n e \ln \left (\left (e x +d \right )^{n}\right ) \ln \left (e x +d \right )}{g \left (d g -e f \right )}+\frac {2 b^{2} n e \ln \left (\left (e x +d \right )^{n}\right ) \ln \left (g x +f \right )}{g \left (d g -e f \right )}-\frac {2 b^{2} n^{2} e \operatorname {dilog}\left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right )}{g \left (d g -e f \right )}-\frac {2 b^{2} n^{2} e \ln \left (g x +f \right ) \ln \left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right )}{g \left (d g -e f \right )}+\frac {b^{2} n^{2} e \ln \left (e x +d \right )^{2}}{g \left (d g -e f \right )}+\left (-i b \pi \,\operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i \left (e x +d \right )^{n}\right )+i \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} b +i \pi \,\operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} b -i \pi \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3} b +2 b \ln \left (c \right )+2 a \right ) b \left (-\frac {\ln \left (\left (e x +d \right )^{n}\right )}{\left (g x +f \right ) g}+\frac {n e \left (-\frac {\ln \left (e x +d \right )}{d g -e f}+\frac {\ln \left (g x +f \right )}{d g -e f}\right )}{g}\right )-\frac {{\left (-i b \pi \,\operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i \left (e x +d \right )^{n}\right )+i \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} b +i \pi \,\operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} b -i \pi \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3} b +2 b \ln \left (c \right )+2 a \right )}^{2}}{4 \left (g x +f \right ) g}\) | \(537\) |
-b^2*ln((e*x+d)^n)^2/(g*x+f)/g-2*b^2/g*n*e*ln((e*x+d)^n)/(d*g-e*f)*ln(e*x+ d)+2*b^2/g*n*e*ln((e*x+d)^n)/(d*g-e*f)*ln(g*x+f)-2*b^2/g*n^2*e/(d*g-e*f)*d ilog(((g*x+f)*e+d*g-e*f)/(d*g-e*f))-2*b^2/g*n^2*e/(d*g-e*f)*ln(g*x+f)*ln(( (g*x+f)*e+d*g-e*f)/(d*g-e*f))+b^2/g*n^2*e/(d*g-e*f)*ln(e*x+d)^2+(-I*b*Pi*c sgn(I*c*(e*x+d)^n)*csgn(I*c)*csgn(I*(e*x+d)^n)+I*Pi*csgn(I*c)*csgn(I*c*(e* x+d)^n)^2*b+I*Pi*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2*b-I*Pi*csgn(I*c*( e*x+d)^n)^3*b+2*b*ln(c)+2*a)*b*(-ln((e*x+d)^n)/(g*x+f)/g+1/g*n*e*(-1/(d*g- e*f)*ln(e*x+d)+1/(d*g-e*f)*ln(g*x+f)))-1/4*(-I*b*Pi*csgn(I*c*(e*x+d)^n)*cs gn(I*c)*csgn(I*(e*x+d)^n)+I*Pi*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2*b+I*Pi*csgn (I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2*b-I*Pi*csgn(I*c*(e*x+d)^n)^3*b+2*b*ln( c)+2*a)^2/(g*x+f)/g
\[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^2} \, dx=\int { \frac {{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2}}{{\left (g x + f\right )}^{2}} \,d x } \]
integral((b^2*log((e*x + d)^n*c)^2 + 2*a*b*log((e*x + d)^n*c) + a^2)/(g^2* x^2 + 2*f*g*x + f^2), x)
\[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^2} \, dx=\int \frac {\left (a + b \log {\left (c \left (d + e x\right )^{n} \right )}\right )^{2}}{\left (f + g x\right )^{2}}\, dx \]
\[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^2} \, dx=\int { \frac {{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2}}{{\left (g x + f\right )}^{2}} \,d x } \]
2*a*b*e*n*(log(e*x + d)/(e*f*g - d*g^2) - log(g*x + f)/(e*f*g - d*g^2)) - b^2*(log((e*x + d)^n)^2/(g^2*x + f*g) - integrate((e*g*x*log(c)^2 + d*g*lo g(c)^2 + 2*(e*f*n + d*g*log(c) + (e*g*n + e*g*log(c))*x)*log((e*x + d)^n)) /(e*g^3*x^3 + d*f^2*g + (2*e*f*g^2 + d*g^3)*x^2 + (e*f^2*g + 2*d*f*g^2)*x) , x)) - 2*a*b*log((e*x + d)^n*c)/(g^2*x + f*g) - a^2/(g^2*x + f*g)
\[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^2} \, dx=\int { \frac {{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2}}{{\left (g x + f\right )}^{2}} \,d x } \]
Timed out. \[ \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^2} \, dx=\int \frac {{\left (a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\right )}^2}{{\left (f+g\,x\right )}^2} \,d x \]